<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员信息模块 </title>

<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
$(function(){
	$("a[class='newone']").click(function(){
		$("table").append($('<tr>'+$("tr:eq(1)").html()+'</tr>'));
		setBg();
	});
	$("table tr td input[type='checkbox']:eq(0)").click(function(){
		$("table tr td input[type='checkbox']").attr("checked",$(this).get(0).checked);
	});
	$("img.del").live("click", function(){
		$(this).parent().parent().remove();
		alert('remove succeed!');
		setBg();
	});
});
function setBg()
{
	$("table tr").attr("bgcolor","#FEFAF7");
	$("table tr :odd").attr("bgcolor","#FAF3E9");
	$("table tr:eq(0)").attr("bgcolor","#EBE7DC");
}
</script>

<style type="text/css" >
*{
	 
	font-size:12px;
}
tr{
	text-align:center;
	height:40px;
}

</style>

</head>
<body>


<table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr bgcolor="#EBE7DC">
    <td><input type="checkbox"/></td>
    <td>姓名</td>
    <td>性别</td>
    <td>卡号</td>
    <td>会员级别</td>
    <td>电话号码</td>
    <td>出生年月日</td>
    <td>消费金额</td>
    <td>&nbsp;</td>
  </tr>
  <tr bgcolor="#FAF3E9">
    <td><input  type="checkbox"/></td>
    <td>张三</td>
    <td>男</td>
    <td>6565654315321321</td>
    <td>短工</td>
    <td>18625455412</td>
    <td>1995-12-09</td>
    <td>10,000.00</td>
    <td>
    	<img  class='add' src="images/add.jpg" />
        <img class='del' src="images/del.jpg" />
    </td>
  </tr>
  <tr bgcolor="#FEFAF7">
    <td><input  type="checkbox"/></td>
    <td>张三</td>
    <td>男</td>
    <td>6565654315321321</td>
    <td>短工</td>
    <td>18625455412</td>
    <td>1995-12-09</td>
    <td>10,000.00</td>
    <td>
    	<img  class='add' src="images/add.jpg" />
        <img class='del' src="images/del.jpg" />
    </td>
  </tr>
    <tr bgcolor="#FAF3E9">
    <td><input  type="checkbox"/></td>
    <td>张三</td>
    <td>男</td>
    <td>6565654315321321</td>
    <td>短工</td>
    <td>18625455412</td>
    <td>1995-12-09</td>
    <td>10,000.00</td>
    <td>
    	<img  class='add' src="images/add.jpg" />
        <img class='del' src="images/del.jpg" />
    </td>
  </tr>
</table>
<a href="#" class='newone'>新增</a>


</body>
</html>
